<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<title>Dom</title>
		<script src="../../py/system.js" type="text/javascript"></script>
		<script src="../../py/system/dom/element.js" type="text/javascript"></script>
		
		<script src="../../common/project/project.js" type="text/javascript"></script>
		<script src="../../common/assets/scripts/default.js" type="text/javascript"></script>
		<script src="../../common/assets/scripts/debug.js" type="text/javascript"></script>
	</head>
	<body> 
		<div style="background: yellow; line-height: inherit" id="a">
				<div style="background: red; width:200px;" id="aa">id=aa<div style="background: black; color:white" id="aba">id=aba</div></div>
				<div style="background: green;" id="ab">id=ab<input type="button" name="button" id="button" value="子控件" /></div>
			</div>
			<div style="position:absolute; left:630px; top:40px;margin:20px; width:300px; height:404px; padding:17px;  border:4px #f32323 solid;  overflow:scroll; " >
			<div style="position:absolute; left:630px; top:40px; margin:20px; height:60px; padding:17px; overflow:scroll; border:4px #f32323 solid; background: blue" id="f">sssss  <table id="t" style='position:absolute;top:5px;left:6px;margin:3px;border:5px solid #000;padding:0;width:1px;height:200px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table></div>
			</div>
			
			<div id="v" style="display: none">n</div>
			<hr>
		<script>
			var a = $('a'), aa = $('aa'), ab = $('ab'), f = $('f'), t = $('t');
			var fns = [
				["Element.prototype.setScroll", function(){ return a.setScroll(2,4); }],
				["Element.prototype.setSize", function(){ return a.setSize(1,3); }],
				["Element.prototype.setHeight/Width", function(){ return a.setHeight(1).setWidth(3); }],
				["Element.prototype.getOffsetParent", function(){ return a.getOffsetParent(); }],
				["Element.prototype.getOffsets", function(){ return a.getOffsets(); }],
				["Element.prototype.getPosition", function(){ return a.getPosition(); }],
				["Element.prototype.getScroll", function(){ return a.getScroll(); }],
				["Element.prototype.getScrollSize", function(){ return a.getScrollSize(); }],
				["Document.prototype.setScroll", function(){ return document.setScroll(2,4); }],
				["Document.prototype.setSize", function(){ return document.setSize(1,3); }],
				["Document.prototype.getOffsetParent", function(){ return document.getOffsetParent(); }],
				["Document.prototype.getOffsets", function(){ return document.getOffsets(); }],
				["Document.prototype.getPosition", function(){ return document.getPosition(); }],
				["Element.getSizes", function(){return Element.getSizes(a, 'x', 'm');}],
				['constrcutor', function (args) {
					a = 111;
				  return a.constructor === Number;
				},null, 100000],
				['Ex', function (args) {
				   a = 111;
				    return typeof a === 'number';
				},null, 100000],
				
				["Element 全部测试 ", function(){
					log("Size = ", f.getSize());
					log("------------------------","");
					log("Position = ", f.getPosition());
					log("------------------------","");
					log("Scroll = ", f.getScroll());
					log("Offsets = ", f.getOffsets());
				}],
				["documen 全部测试 ", function(){
					log("Size = ", document.getSize());
					log("------------------------","");
					log("Position = ", document.getPosition());
					log("------------------------","");
					log("Scroll = ", document.getScroll());
					log("Offsets = ", document.getOffsets());
				}]
			];
		</script>
	</body>
</html>
